#include "corectrl.h"
#include "core/coredefine.h"

static CoreCtrl* core_ctrl_ = nullptr;
CoreCtrl* CoreCtrl::get_instance()
{
    if (nullptr == core_ctrl_)
        core_ctrl_ = new CoreCtrl(nullptr);

    return core_ctrl_;
}

CoreCtrl::CoreCtrl(QObject *parent)
    : QObject{parent},
      web_handler_(WebHandler::get_instance()),
      user_pool_()
{
    DEBUG_FUNC;
}

void CoreCtrl::start(quint16 port)
{
    web_handler_->start(port);
}

CoreCtrl::~CoreCtrl()
{
    DEBUG_FUNC;
}
